const db = require("./db");

async function getUsers() {
  try {
    const [rows, fields] = await db.query("SELECT * FROM student");
    console.log("Users:", rows);
    return rows;
  } catch (error) {
    console.error("Error fetching users:", error);
    throw error;
  }
}

module.exports={getUsers}